import {baseURL, headers} from "@/config";

import axios from "axios";

import {getCookie} from "@/utils";

export async function post(path,data) {
    headers.token = getCookie('token')
    headers.email = getCookie('email')
    return axios({
        headers:headers,
        method: 'post',
        url: baseURL + path,
        data
    });
}

export async function get(path,params) {
    headers.token = getCookie('token')
    headers.email = getCookie('email')
    return axios({
        headers:headers,
        method: 'get',
        url: baseURL + path,
        params
    })
}

